<!--
 * @Autor: ZN
 * @LastEditors: modefy
 * @Date: 2023-04-27 15:55:01
 * @LastEditTime: 2023-05-04 16:55:32
 * @Description: 矩形卡片-首页
-->
<template>
  <div class="rect-card">
    <div class="card-left">
      <img :src="props.data.img" alt="" />
    </div>

    <div class="card-right">
      <div class="title">{{ props.data.title }}</div>
      <div class="value">{{ props.data.value }}</div>
    </div>
  </div>
</template>

<script setup lang="ts">
interface dataType {
  img: any;
  title: string;
  value: string | number;
}

const props = withDefaults(
  defineProps<{
    data: dataType;
  }>(),
  {}
);
</script>

<style scoped lang="scss">
.rect-card {
  width: 377px;
  height: 108px;
  border-radius: 2px;
  background-color: #fff;
  box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.05);
  overflow: hidden;
  color: #666;
  padding: 10px 15px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;

  .card-left {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;

    img {
      width: 100%;
      height: 100%;
    }
  }

  .card-right {
    display: flex;
    flex-direction: column;

    .title {
      color: rgba(0, 0, 0, 0.5);
      font-weight: bold;
      font-size: 16px;
      margin-bottom: 17px;
      // font-family: gjfybxs;
    }

    .value {
      color: #555;
      font-weight: bold;
    }
  }
}
</style>
